package com.torry.edss.integration.feign.eastmoney.response;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

@Data
@ApiModel("指数资金流响应数据")
public class EMIndexFundFlowResponse {

    @JsonProperty("rc")
    @ApiModelProperty(value = "返回码", example = "0")
    private Integer returnCode;

    @JsonProperty("rt")
    @ApiModelProperty(value = "响应时间（毫秒）", example = "22")
    private Integer responseTime;

    @ApiModelProperty("指数资金流详情数据")
    private FundFlowData data;

    @JsonProperty("lt")
    @ApiModelProperty(value = "未知字段（需确认用途）", example = "1")
    private Integer lt;

    @JsonProperty("dlmkts")
    @ApiModelProperty(value = "未知字段（需确认用途）", example = "")
    private String dlMkts;

    @JsonProperty("svr")
    @ApiModelProperty(value = "服务器标识", example = "181669692")
    private Long serverId;

    @JsonProperty("full")
    @ApiModelProperty(value = "是否全量数据", example = "0")
    private Integer full;

    @Data
    @ApiModel("指数资金流详情")
    public static class FundFlowData {

        @JsonProperty("code")
        @ApiModelProperty(value = "指数代码", example = "000001")
        private String indexCode;

        @JsonProperty("market")
        @ApiModelProperty(value = "市场类型", example = "1")
        private Integer marketType;

        @JsonProperty("name")
        @ApiModelProperty(value = "指数名称", example = "上证指数")
        private String indexName;

        @ApiModelProperty(value = "资金流数据列表（每项为逗号分隔的字符串）")
        /**
         * 2025-05-08,-3446927872.0,12493770752.0,-9046839296.0,-8922095616.0,5475167744.0,  -0.27,     0.97,      -0.70,   -0.69,  0.42,       3351.99, 0.28,  10197.66,  0.93
         * 日期           主力净额        小单净额        中单净额     大单净额       超大单净额    主力净占比  小单净占比    中单...   大单...  超大单...     上证    涨幅     深证       涨幅
         */
        private List<String> klines;
    }
}